package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.OrderOtherMapper;
import com.ly.heart.service.IOrderOtherService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.OrderOtherEntity;

import javax.annotation.Resource;

/**
 * 采购订单其他信息Service业务层处理
 *
 * @author cxl
 * @date 2024-06-23
 */
@Service
public class OrderOtherServiceImpl extends ServiceImpl<OrderOtherMapper,OrderOtherEntity> implements IOrderOtherService {

    @Resource
    private OrderOtherMapper orderOtherMapper;

    /**
     * 查询采购订单其他信息
     *
     * @param id 采购订单其他信息ID
     * @return 采购订单其他信息
     */
    @Override
    public OrderOtherEntity selectOrderOtherEntityById(String id)
    {
        return orderOtherMapper.selectOrderOtherEntityById(id);
    }

    /**
     * 查询采购订单其他信息列表
     *
     * @param orderOtherEntity 采购订单其他信息
     * @return 采购订单其他信息
     */
    @Override
    public List<OrderOtherEntity> selectOrderOtherEntityList(OrderOtherEntity orderOtherEntity)
    {
        return orderOtherMapper.selectOrderOtherEntityList(orderOtherEntity);
    }

    /**
     * 新增采购订单其他信息
     *
     * @param orderOtherEntity 采购订单其他信息
     * @return 结果
     */
    @Override
    public int insertOrderOtherEntity(OrderOtherEntity orderOtherEntity)
    {
        orderOtherEntity.setCreateTime(DateUtils.getNowDate());
        return orderOtherMapper.insertOrderOtherEntity(orderOtherEntity);
    }

    /**
     * 修改采购订单其他信息
     *
     * @param orderOtherEntity 采购订单其他信息
     * @return 结果
     */
    @Override
    public int updateOrderOtherEntity(OrderOtherEntity orderOtherEntity)
    {
        return orderOtherMapper.updateOrderOtherEntity(orderOtherEntity);
    }

    /**
     * 批量删除采购订单其他信息
     *
     * @param ids 需要删除的采购订单其他信息ID
     * @return 结果
     */
    @Override
    public int deleteOrderOtherEntityByIds(String[] ids)
    {
        return orderOtherMapper.deleteOrderOtherEntityByIds(ids);
    }

    /**
     * 删除采购订单其他信息信息
     *
     * @param id 采购订单其他信息ID
     * @return 结果
     */
    @Override
    public int deleteOrderOtherEntityById(String id)
    {
        return orderOtherMapper.deleteOrderOtherEntityById(id);
    }
}
